package com.zhuiyun.project.api.memberUserManagement.service;

import com.zhuiyun.project.api.coachmanagement.entity.CoachManagement;
import com.zhuiyun.project.api.memberTypeManagement.entity.MemberCardNumber;
import com.zhuiyun.project.api.memberTypeManagement.model.MemberTypeModel;
import com.zhuiyun.project.api.memberUserManagement.entity.MemberUserManagement;
import com.zhuiyun.project.api.memberUserManagement.model.MemberUserAndTypeModel;
import com.zhuiyun.project.api.memberUserManagement.model.MemberUserModel;
import com.zhuiyun.project.common.errorCode.CommonException;
import com.zhuiyun.project.common.response.CommonResult;
import com.zhuiyun.project.utils.pageUtil.PageRequest;
import com.zhuiyun.project.utils.pageUtil.PageResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.websocket.server.PathParam;

/**
 * @InterfaceName MemberUserManagementService
 * @Description TODO 会员用户管理业务层接口
 * @Author WX
 * @Date 2023/11/3 8:35
 **/
public interface MemberUserManagementService {

    /**
     * @Author WX
     * @Description 获取会员用户信息
     * @Date 2023/11/3 10:15
     * @Return
     * @param pageRequest memberUserModel
     */
    PageResult getMemberType(PageRequest pageRequest, MemberUserModel memberUserModel);
    CommonResult selectByPhone(MemberUserAndTypeModel memberUserAndTypeModel);
    CommonResult selectByPhoneOnly(String phone);
    /**
     * @Author wx
     * @Description 查询会员类型信息
     * @Date 2023/11/6 9:20
     * @Return
     */
    CommonResult getMemberList(String venueUniqueIdentifier);
    /**
     * @Author wx
     * @Description 新增会员类型信息
     * @Date 2023/11/6 10:18
     * @Return
     * @param memberUserAndTypeModel file
     */
    CommonResult addMember(MemberUserAndTypeModel memberUserAndTypeModel, MultipartFile file)  throws CommonException;

    /**
     * @Author wx
     * @Description 根据id查询单个会员的数据
     * @Date 2023/11/7 8:29
     * @Return
     * @param id
     */
    MemberUserAndTypeModel getById(Integer id,String venueUniqueIdentifier);

    /**
     * @Author wx 通过id修改会员用户信息
     * @Description
     * @Date 2023/11/7 9:40
     * @Return
     * @param memberUserAndTypeModel,file
     */
    CommonResult updateMemberById(MemberUserAndTypeModel memberUserAndTypeModel, MultipartFile file) throws CommonException;
    /**
     * @Author wx 通过id修改会员用户信息
     * @Description
     * @Date 2023/11/7 9:40
     * @Return
     * @param memberUserAndTypeModel,file
     */
    CommonResult updateMemberByIds(MemberUserAndTypeModel memberUserAndTypeModel) ;

    /**
     * @Author wx
     * @Description 根据邀请码查询教练的数据
     * @Date 2023/11/7 8:29
     * @Return
     * @param invitationCode
     */
    CoachManagement getByInvitationCode(String invitationCode, String venueUniqueIdentifier);

    /**
     * @Author wx
     * @Description 刷卡确认后条件判断删除任务
     * @Date 2023/12/3 18:51
     * @Return
     * @param venueUniqueIdentifier,memberUserPhone
     */
    CommonResult getByMemberUserPhone(String memberUserPhone, String venueUniqueIdentifier);

    /**
     * @Author wx
     * @Description 教练端查询会员信息
     * @Date 2023/12/12 9:57
     * @Return
     * @param id
     */
    CommonResult selectUserCase(String venueUniqueIdentifier, Integer id,String coachId);

    /**
     * @Author wx
     * @Description 查询用户案例图片
     * @Date 2023/12/12 10:21
     * @Return
     * @param id
     */
    CommonResult selectUserInfoImage(Integer id,Integer coachId);

    /**
     * @Author wx
     * @Description 查询场管名称
     * @Date 2023/12/13 8:51
     * @Return
     * @param venueUniqueIdentifier
     */
    CommonResult selectVenueName(String venueUniqueIdentifier);
    /**
     * @Author wx
     * @Description 读卡回显信息
     * @Date 2023/12/22 9:03
     * @Return
     * @param venueUniqueIdentifier
     */
    CommonResult selectUserInfoByNumid(String venueUniqueIdentifier, String membershipCardNumber);

    /**
     * @Author wx
     * @Description 查询入会人数
     * @Date 2023/12/27 20:33
     * @Return
     * @param venueUniqueIdentifier
     */
    CommonResult selectOnlineStatuss(String venueUniqueIdentifier);

    /**
    * @Author 胡家浩
    * @Description 查询当天入场人数
    * @Date 2024/5/16 16:32
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param venueUniqueIdentifier
* @param currentDate
    */
    CommonResult selectEntranceNumber (String venueUniqueIdentifier,String currentDate);


    /**
     * @Author 胡家浩
     * @Description 根据卡号查询该用户当天是否入场
     * @Date 2024/5/16 20:48
     * @Return java.util.List<com.zhuiyun.project.api.memberTypeManagement.entity.MemberCardNumber>
     * @param memberCardNumber
     */
    CommonResult userIfEntrance (MemberCardNumber memberCardNumber);

    /**
     * @Author wx
     * @Description 会员离场
     * @Date 2023/12/28 8:16
     * @Return
     * @param id
     */
    CommonResult outVenuById(String venueUniqueIdentifier, Integer id);

    /**
     * @Author wx
     * @Description 会员入场
     * @Date 2023/12/28 8:16
     * @Return
     * @param id
     */
    CommonResult intoVenuById(String venueUniqueIdentifier, Integer id);

    MemberUserManagement selectMemberByPhone(String phone);

    void insertMemberUser(MemberUserManagement m);

    CommonResult updateMemberInfoById(MemberUserAndTypeModel memberUserAndTypeModel);

    /**
    * @Author 胡家浩
    * @Description 统计会员入场的次数
    * @Date 2024/5/21 16:56
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param venueUniqueIdentifier
    * @param year
    * @param month
    * @param week
    */
    CommonResult getMemberEntranceTimes (String venueUniqueIdentifier,String year,String month,String week);

    /**
    * @Author 胡家浩
    * @Description 统计会员办卡情况(根据日期)
    * @Date 2024/5/21 17:07
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param venueUniqueIdentifier
    * @param year
    * @param month
    * @param week
    */
    CommonResult getMemberUserCardDate (String venueUniqueIdentifier,String year,String month,String week);
}
